package com.botarena.server.model;

import java.util.HashSet;
import java.util.Set;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Account extends Entity {
	@Persistent
	private String email;
	@Persistent
	private String username;
	@Persistent
	private String name;
	@Persistent
	private Blob avatar;
	@Persistent
	private Set<Key> bots;
	@Persistent
	private Set<Key> contests;
	
	public Account() {
		this(null, null, null);
	}
	
	public Account(String email, String username, String name) {
		bots = new HashSet<Key>();
		contests = new HashSet<Key>();
		this.email = email;
		this.username = username;
		this.name = name;
	}
	
	public String getEmail() {
		return email;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public Blob getAvatar() {
		return avatar;
	}
	
	public void setAvatar(Blob avatar) {
		this.avatar = avatar;
	}
	
	public Set<Key> getBots() {
		return bots;
	}
	
	public void setBots(Set<Key> bots) {
		this.bots = bots;
	}
	
	public Set<Key> getContests() {
		return contests;
	}
	
	public void setContests(Set<Key> contests) {
		this.contests = contests;
	}
}
